package com.masterrabbit.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.masterrabbit.mapper.ReviewsMapper;
import com.masterrabbit.domain.Reviews;
import com.masterrabbit.service.IReviewsService;

/**
 * 评价信息Service业务层处理
 * 
 * @author laotu
 * @date 2025-03-19
 */
@Service
public class ReviewsServiceImpl implements IReviewsService 
{
    @Autowired
    private ReviewsMapper reviewsMapper;

    /**
     * 查询评价信息
     * 
     * @param reviewId 评价信息主键
     * @return 评价信息
     */
    @Override
    public Reviews selectReviewsByReviewId(Long reviewId)
    {
        return reviewsMapper.selectReviewsByReviewId(reviewId);
    }

    /**
     * 查询评价信息列表
     * 
     * @param reviews 评价信息
     * @return 评价信息
     */
    @Override
    public List<Reviews> selectReviewsList(Reviews reviews)
    {
        return reviewsMapper.selectReviewsList(reviews);
    }

    /**
     * 新增评价信息
     * 
     * @param reviews 评价信息
     * @return 结果
     */
    @Override
    public int insertReviews(Reviews reviews)
    {
        return reviewsMapper.insertReviews(reviews);
    }

    /**
     * 修改评价信息
     * 
     * @param reviews 评价信息
     * @return 结果
     */
    @Override
    public int updateReviews(Reviews reviews)
    {
        return reviewsMapper.updateReviews(reviews);
    }

    /**
     * 批量删除评价信息
     * 
     * @param reviewIds 需要删除的评价信息主键
     * @return 结果
     */
    @Override
    public int deleteReviewsByReviewIds(Long[] reviewIds)
    {
        return reviewsMapper.deleteReviewsByReviewIds(reviewIds);
    }

    /**
     * 删除评价信息信息
     * 
     * @param reviewId 评价信息主键
     * @return 结果
     */
    @Override
    public int deleteReviewsByReviewId(Long reviewId)
    {
        return reviewsMapper.deleteReviewsByReviewId(reviewId);
    }
}
